package com.SampleTimer;

import java.util.Timer;
import java.util.TimerTask;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class SampleTimer extends Activity {
    /** Called when the activity is first created. */

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Timer	timer	= new Timer();
        MyTask	myTask	= new MyTask();
        
        //timer.schedule(myTask, 500);//0.5초 후에 1회 실행
        timer.schedule(myTask, 500, 3000);//0.5초후에 1회 실행후 매 3초마다 반복적으로 실행

    }
    
    class MyTask extends TimerTask{

		@Override
		public void run() {
			// TODO Auto-generated method stub
			Log.i("MyTask", "MyTask Started");
			
		}
    	
    }
}